Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provider/kubernetes: Add support for persistent_volume #13277

Merged
merged 2 commits into from
Apr 11, 2017

Conversation

radeksimko
Copy link
Member

@radeksimko radeksimko commented Apr 2, 2017

Sorry for the 2,4k LOC 🙈 , but vast majority of it is the schema & related expanders/flatteners.

Test plan

I avoided writing tests for every single volume source provider for two reasons - avoid ⬆️ LOC and because K8S API doesn't seem to care about anything except optional/required fields. That is also why most of the configs have non-sense volume IDs etc. which don't exist. I suspect K8S would only failed to schedule a pod with such volume - i.e. it is just postponing the error/validation to latest moment.

I did try to create PV for each volume source provider manually though and that worked 👌 .

make testacc TEST=./builtin/providers/kubernetes TESTARGS='-run=TestAccKubernetesPersistentVolume_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/04/02 18:51:04 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/kubernetes -v -run=TestAccKubernetesPersistentVolume_ -timeout 120m
=== RUN   TestAccKubernetesPersistentVolume_basic
--- PASS: TestAccKubernetesPersistentVolume_basic (5.37s)
=== RUN   TestAccKubernetesPersistentVolume_importBasic
--- PASS: TestAccKubernetesPersistentVolume_importBasic (1.68s)
=== RUN   TestAccKubernetesPersistentVolume_volumeSource
--- PASS: TestAccKubernetesPersistentVolume_volumeSource (2.63s)
=== RUN   TestAccKubernetesPersistentVolume_cephFsSecretRef
--- PASS: TestAccKubernetesPersistentVolume_cephFsSecretRef (1.91s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/kubernetes	11.662s

Copy link
Contributor

@grubernaut grubernaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, pending fixed merge conflicts

@radeksimko radeksimko merged commit 69096a5 into master Apr 11, 2017
@radeksimko radeksimko deleted the f-k8s-persistent-volume branch April 11, 2017 06:10
@ghost
Copy link

ghost commented Apr 14, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants